package Exercise;

import java.util.TreeSet;

public class Test {
    public static void main(String[] args) {
        Student s1 = new Student("zhangsan",23,90,99,50);
        Student s2 = new Student("lisi",24,90,98,50);
        Student s3 = new Student("wangwu",25,95,100,30);
        Student s4 = new Student("zhaoliu",26,66,99,70);
        Student s5 = new Student("qianqi",26,70,80,70);

        TreeSet<Student> stu = new TreeSet<>();
        stu.add(s1);
        stu.add(s2);
        stu.add(s3);
        stu.add(s4);
        stu.add(s5);

        //System.out.println(stu);
        for(Student t:stu){
            System.out.println(t.getName()+","+t.getAge()+","+t.getChineseScore()+","+t.getMathScore()+","+t.getEnglishScore());
        }
    }
}
